package com.example.demo.dao;

import com.example.demo.model.Dishes;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface DishesDao {
    int deleteByPrimaryKey(Long dishId);

    int insert(Dishes record);

    int insertSelective(Dishes record);

    Dishes selectByPrimaryKey(Long dishId);

    int updateByPrimaryKeySelective(Dishes record);

    int updateByPrimaryKey(Dishes record);

    Dishes findByName(String name);

    List<Dishes> findAll();

    public void incrementDishViewCount(Long dishId);

}